//
//  GDQrcodeViewController.m
//  GDWeiboNJ
//
//  Created by zhouguodong on 15/4/6.
//  Copyright (c) 2015年 shuanyuan. All rights reserved.
//

#import "GDQrcodeViewController.h"

@interface GDQrcodeViewController ()
- (IBAction)coloseVc:(id)sender;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *QrcodeY;


@end

@implementation GDQrcodeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    // 创建定时器
    CADisplayLink *link = [CADisplayLink displayLinkWithTarget:self selector:@selector(update)];
    // 添加到运行循环
    [link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
}

- (void)update
{
    self.QrcodeY.constant += 3;
    if (self.QrcodeY.constant >= 120) {
        self.QrcodeY.constant = -120;
    }
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (IBAction)coloseVc:(id)sender {
    // 关闭控制器
    [self dismissViewControllerAnimated:YES completion:nil];
}
@end
